Speeding up Tan Kok Mun's Music Box (PalmPilot cbasPad program):
In Version 2.01 of Music Box there are two things that can be improved:
1) You need to type in the entire title of the song. This is tedious and causes you to name the songs with abbreviations instead of the full song titles.
2) It takes a while for Music Box to search through all of the memo records for the matching song title. This is especially slow if you have a lot of memo records and the one you are looking for is near the end alphabetically.
In the cbasPad editor, bring up the Music Box source and replace lines 20 to 26:
20 z=z+1
22 if (op "db", 1145132097, 1835363695,z)=0 then 5000 24 x=fn 80:gosub 3000
26 if not(a$=s$) then 20
with:
20 z=op "mfind",s$,n
21 if z=-1 then 5000
22 if (op "db", 1145132097, 1835363695,z)=0 then 5000 24 x=fn 80:gosub 3000
(Yes, line 22 is actually unchanged. What this does is replace a slow BASIC loop with a quick mfind call to find the song title.).
This allows you to enter just the starting substring of a song to play it. You can now play a song titled "Happy Birthday" by just typing in "Hap" (of even "Ha" or "H" if there are no other matches or that would match first). If there is a "london bridge" and a "looney", entering "lo" would play "london bridge" while "loo" would play "looney".
I have sent this enhancement to Tan Kok Mun, but he has not released a new version of Music Box with it yet.
Music Box: http://home.pacific.net.sg/~kokmun
cbasPad: http://www.nicholson.com/rhn/pilot.html
Have fun!
Robert Jen (http://www.rjen.com or mailto:rjen@rjen.com)